/**
 * @file Main.cpp
 * @author
 * @brief 
 */
#include <stdio.h>
#include "sendcmd.h"
#include "CmdGenerator.h"
#include "Point.h"
#include <math.h>	/* pow */
#include <stdlib.h>	/* rand */

using namespace std;

int main()
{
	// Generate dummy Robotdata
	CmdGenerator* gen = new CmdGenerator();
	CmdGenerator gen1 ();

	// Dummy coordinate list
	vector<Point> dummyList(10);
	for(int i = 0; i < dummyList.size(); i++)
	{
		Point p3 (i,pow(2,i));
		dummyList.at(i) = p3;
		//printf("Point %d: x = %d, y = %d\n", i, dummyList.at(i).getX(), dummyList.at(i).getY());
	}
	printf("Dummylist generated\n");

	// Possible real coordinate list
	vector<Point> realList(10);
	for(int i = 0; i < realList.size(); i++)
	{
		Point p3 (rand() % 100 + 1,rand() % 100 + 1);
		realList.at(i) = p3;
		//printf("Point %d: x = %d, y = %d\n", i, realList.at(i).getX(), realList.at(i).getY());
	}
	printf("Reallist generated\n");

	vector<Cmd> cmdList;
	cmdList = gen->generateList(realList, 180);
	for(int i = 0; i < cmdList.size(); i++)
	{
		printf("Cmd %d: turn = %d, distance = %d\n", i, cmdList.at(i).getAngle(), cmdList.at(i).getDistance());

	}

	//sendcmd s;
	
	//s.drive(50,0);		//rijd 50 vooruit
	//s.drive(50,90);		//draai 90° en rijd 50 vooruit

	printf("Process ran till its very end\n");
}
